package com.runvp.service.biz.domain;

import com.runvp.common.annotation.Excel;
import com.runvp.common.annotation.ModelFileFieldShow;
import com.runvp.common.annotation.NotBlank;
import com.runvp.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Transient;
import java.math.BigDecimal;

/**
 * 商品列表对象 biz_goods
 *
 * @author runvp
 * @date 2022-09-18
 */
@ToString
@Getter
@Setter
public class BizGoods extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 设备号 */
    @Excel(name = "设备号")
    private String deviceSn;
    /** 租户标识 */
    @Excel(name = "租户标识")
    private Long tenantId;

    /** 商品分类 */
    @Excel(name = "商品分类")
    private Long categoryId;

    /** 排序 */
    @Excel(name = "排序")
    private Integer sort;

    /** 商品名称 */
    @NotBlank(message = "商品名称",maxLen = 50)
    @Excel(name = "商品名称")
    private String name;

    /** 商品价格 */
    @Excel(name = "商品价格")
    private BigDecimal price;

    /** 商品进价 */
    @Excel(name = "商品进价")
    private BigDecimal costPrice;
    /** 条形码 */
    @Excel(name = "条形码")
    private String barCode;

    /** 商品图片 */
    @Excel(name = "商品图片")
    private String diagram;

    @Excel(name = "表单附件",type = Excel.Type.EXPORT)
    private String diagramUrl;


    @ModelFileFieldShow
    private String diagramResources;

    @Transient
    private String delFileCodes;


    /** 商品详情 */
    @Excel(name = "商品详情")
    private String descr;

    /** 详情图 */
    @Excel(name = "详情图")
    private String descrDiagram;

    /** 启用状态 */
    @Excel(name = "启用状态")
    private String status;

    @Transient
    private Long priceId;
}
